#define _GNU_SOURCE
#include "app_pool.h"
#include <stdio.h>
#include <unistd.h>
 

//定义任务
void *func(void *arg)
{
    sleep(1);
    printf(" hello1 zhang3 %d\n",gettid());
    return NULL;    
}

int main(int argc, char const *argv[])
{
    // 1  初始化 
     app_pool_init();

    //2  提交任务
    app_pool_submit_task(func,NULL);
    app_pool_submit_task(func,NULL);
    app_pool_submit_task(func,NULL);
    app_pool_submit_task(func,NULL);
    app_pool_submit_task(func,NULL);
    app_pool_submit_task(func,NULL);


    //3 sleep
    sleep(10);

    // 4 销毁
    app_pool_destroy();
    return 0;
}
